var express = require("express");
var router = express.Router();
const { userModule } = require("../module/module");

/* GET home page. */
router.get("/", function (req, res, next) {
  res.render("index", { title: "Express" });
});

router.get("/userList", async (req, res) => {
  const data = await userModule.find();
  res.send(data);
});

module.exports = router;
